package com.kof.dao.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;


import org.apache.tomcat.jdbc.pool.DataSource;
import org.springframework.stereotype.Repository;

import com.kof.dao.UserDao;
import com.kof.model.User;

@Repository
public class UserDaoImpl  extends BaseDaoImpl<User,Integer> implements UserDao{
	
	
			/*
			String sql="insert into reg_user(username,password,sex,email,pwd_question,pwd_answer,reg_date) values(?,?,?,?,?,?,?)";
			pstmt=conn.prepareStatement(sql);
			int index=0;
			pstmt.setString(++index, user.getUsername());
			pstmt.setString(++index, user.getPassword());
			pstmt.setBoolean(++index, user.getSex());
			pstmt.setString(++index, user.getEmail());
			pstmt.setString(++index, user.getPwdQuestion());
			pstmt.setString(++index, user.getPwdAnswer());
			pstmt.setTimestamp(++index, new java.sql.Timestamp(user.getRegDate().getTime()));
			
			pstmt.execute();
			
			rs=pstmt.executeQuery("select last_insert_id()");
			if(rs.next())
				user.setId(rs.getInt(1));
		*/
	
	
	

	
}
